/** 中间容器样式 - 左侧预览及右侧的主编辑器 */
.konva-root-container {
    width: 100%;
    height: calc(100% - @TopHeight - @FooterHeight);
    max-height: calc(100vh - @TopHeight - @FooterHeight);
    display: flex;
    position: relative;
    overflow: hidden;

    // 左侧幻灯片预览
    &-thumb {
        padding: 4px;
        width: @PreviewWidth;
        border-right: solid var(--konva-border-color, @konva-border-color) 1px;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: hidden;
        overflow-y: auto;

        &>div {
            transition: all 0.2s;
            width: 100%;
            margin: 14px 4px;
            display: flex;
            align-items: center;
            min-width: 0;

            span {
                font-size: 12px;
                color: var(--konva-main-color-5, @konva-main-color-5);
                width: 20px;
                user-select: none;
            }

            .imageBox {
                width: calc(100% - 24px);
                height: 100%;
                border-radius: @BorderRadius;
                border: solid 2px var(--konva-main-color-3, @konva-main-color-3);
                box-shadow: 0 0 10px #0000001a;
                transition: all 0.2s;
                position: relative;

                &:hover {
                    border-color: var(--konva-main-color, @konva-main-color);
                    transition: all 0.2s;

                    div {
                        display: flex;
                    }
                }

                div {
                    position: absolute;
                    left: 0;
                    bottom: 0;
                    transform: translateY(50%);
                    display: none;
                    justify-content: space-between;
                    align-items: center;
                    width: 100%;
                    padding: 0 4px;

                    i {
                        color: var(--konva-main-color, @konva-main-color);
                        font-size: 22px;
                        cursor: pointer;
                        border-radius: 50%;
                        padding: 4px;

                        &:hover {
                            color: #fff;
                            background-color: var(--konva-main-color-3, @konva-main-color-3);
                        }
                    }
                }
            }

            img {
                width: 100%;
                height: 100%;
                border-radius: @BorderRadius;
                user-select: none;
                pointer-events: none;
            }
        }

        // 激活的 幻灯片样式
        .active {
            div {
                border-color: var(--konva-main-color, @konva-main-color);
            }

            span {
                color: var(--konva-main-color, @konva-main-color);
            }
        }

        // 拖拽过程中的样式变化
        .thumb-draging {
            transition: all 0.3s;
            border: dashed 2px #ccc !important;

            img {
                opacity: 0;
            }
        }

        .thumb-dragenter {
            background-color: var(--konva-main-color-1, @konva-main-color-1);
        }
    }

    // konvajsContent 容器
    &-zoom {
        position: relative;
        margin: 10px;
        overflow: hidden;
        flex: auto;
        display: flex;
        justify-content: center;
        align-items: center;

        .scroll-x,
        .scroll-y {
            z-index: 9;
            position: absolute;
            cursor: pointer;
            background-color: var(--konva-scrollbar-thumb-color,
                    @konva-scrollbar-thumb-color );
            border-radius: 4px;
        }

        .scroll-x {
            left: 0;
            bottom: 0;
            height: 4px;

        }

        .scroll-y {
            right: 0;
            top: 0;
            width: 4px;
        }
    }

    // 这个是实现缩放平移的关键
    &-konvabox {
        position: relative;
        flex: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .konvajs-content {
        flex-shrink: 0;
        box-shadow: 0 0 15px var(--konva-box-shadow-color, @konva-box-shadow-color);
        overflow: hidden;
        transition: all 0.2s;
    }


    // 文本输入框
    &-textarea {
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        display: none;
        position: absolute;
        width: 0;
        height: 0;
        z-index: 9999;

        // 这里内部还包了一个 div 哈
        &>div:focus-visible {
            outline: none;
        }
    }

    // 框选实现
    &-frame_selected {
        position: absolute;
        display: none;
        left: 0;
        top: 0;
        width: 0;
        height: 0;
        background-color: var(--konva-main-color-1, @konva-main-color-1);
        border: solid var(--konva-main-color-3, @konva-main-color-3) 1px;
        opacity: 0.6;
        z-index: 999;
        user-select: none;
        pointer-events: none;
    }

    // 右键菜单
    &-contextmenu {
        background-color: #fff;
        z-index: 9999;
        position: absolute;
        padding: 10px;
        width: 180px;
        border-radius: @BorderRadius;
        box-shadow: 0 0 10px var(--konva-box-shadow-color, @konva-box-shadow-color);
    }
}